prep

load packages

library(tidyverse)
library(lme4)
library(lmerTest)
library(knitr)

define aesthetics

algorithm = c("#006989", "#FEC601", "#F43C13", "#00A5CF", "#00A878")
food = c("#A4C960", "#2A5C8C")
liking = c("#FF0000", "#F2AD00")
bid = c("#00A08A", "#F2AD00", "#F98400", "#FF0000")
dc_bw = plot_aes = theme_minimal() +
  theme(legend.position = "top",
        legend.text = element_text(size = 12),
        text = element_text(size = 16, family = "Futura Medium"),
        panel.grid.major = element_blank(),
        panel.grid.minor = element_blank(),
        axis.text = element_text(color = "black"),
        axis.line = element_line(colour = "black"),
        axis.ticks.y = element_blank())

define functions

table_model = function(model_data) {
  model_data %>%
    broom.mixed::tidy(., conf.int = TRUE) %>%
    rename("SE" = std.error,
           "t" = statistic,
           "p" = p.value) %>%
    filter(effect == "fixed") %>%
    select(-group, -effect) %>%
    mutate_at(vars(-contains("term"), -contains("value")), round, 2) %>%
    mutate(term = gsub(":", " x ", term),
           term = gsub("dot_", "", term),
           term = gsub("liking_rating", "liking", term),
           term = gsub("healthunhealthy", "health (unhealthy)", term),
           p = ifelse(p < .001, "< .001",
                      ifelse(p == 1, "1.000", gsub("0.(.*)", ".\\1", sprintf("%.3f", p)))),
           `b [95% CI]` = sprintf("%.2f [%0.2f, %.2f]", estimate, conf.low, conf.high)) %>%
    select(term, `b [95% CI]`, df, t, p) %>%
    kable()
}

load and tidy task data

task = read.csv("~/Documents/code/sanlab/DEV_scripts/fMRI/fx/multiconds/WTP/betaseries/events.csv", stringsAsFactors = FALSE) %>%
  mutate(bid = ifelse(bid == "NULL", NA, bid),
         bid = as.integer(bid),
         health = as.factor(health),
         liking = as.factor(liking)) %>%
  group_by(subjectID, wave, run) %>%
  mutate(trial = row_number()) %>%
  filter(wave %in% 1:2)

check responses

Check if wrong buttons were used (i.e., not 5-8)

  • DEV002 = wrong button box (i.e. 1-4) used
  • DEV007 = wrong button box (i.e. 1-4) used
  • DEV011 = code normally
  • DEV017 = exclude; can’t tell if they’re missed responses or incorrect placement of fingers
  • DEV019 = exclude; can’t tell if they’re missed responses or incorrect placement of fingers
  • DEV032 = code normally
  • DEV033 = incorrect placement of fingers; recode runs 1-3
  • DEV054 = exclude; technical error?
  • DEV061 = code normally

NB! NEED TO GO THROUGH NEW PARTICPANTS/WAVES

subs = task %>%
  mutate(bid = as.character(bid)) %>%
  group_by(subjectID, run, bid) %>%
  summarize(n = n()) %>%
  spread(bid, n) %>%
  mutate(messed = ifelse(!is.na(`2`), "yes", NA),
         messed = ifelse(is.na(`5`) & !is.na(`<NA>`), "yes", messed)) %>%
  filter(messed == "yes") %>% 
  ungroup() %>% 
  select(subjectID) %>% 
  unique()

task %>%
  mutate(bid = as.character(bid)) %>%
  group_by(subjectID, run, bid) %>%
  summarize(n = n()) %>%
  spread(bid, n) %>%
  mutate(messed = ifelse(!is.na(`2`), "yes", NA),
         messed = ifelse(is.na(`5`) & !is.na(`<NA>`), "yes", messed)) %>%
  filter(subjectID %in% subs$subjectID)

recode and exclude

Recoding
* DEV033: recode runs1-3, but if liking rating < 3, leave as missing

NB! NEED TO GO THROUGH NEW PARTICPANTS/WAVES

data.ex = task %>%
  mutate(bid = ifelse(subjectID == "DEV033" & wave == 1 & !run == "run4", bid - 1, bid),
         bid = ifelse(subjectID == "DEV033" & wave == 1 & !run == "run4" & is.na(bid) & liking_rating > 2, 8, bid),
         bid = (bid - 5) / 2) %>%
  group_by(subjectID, wave) %>%
  arrange(subjectID, run) %>%
  mutate(trial = row_number())

load mean intensity values

file_dir = "~/Documents/code/sanlab/DEV_scripts/fMRI/betaseries/WTP/dotProducts_WTP_wave1/"
file_pattern = "DEV[0-9]{3}_meanIntensity.txt"
file_list = list.files(file_dir, pattern = file_pattern)

intensities = data.frame()

for (file in file_list) {
  temp = tryCatch(read.table(file.path(file_dir,file), fill = TRUE) %>%
                    rename("subjectID" = V1,
                           "meanIntensity" = V3) %>%
                    extract(V2, "beta", "beta_([0-9]{4}).nii") %>%
                    mutate(beta = as.integer(beta),
                           wave = 1), error = function(e) message(file))
  intensities = rbind(intensities, temp)
  rm(temp)
}

file_dir = "~/Documents/code/sanlab/DEV_scripts/fMRI/betaseries/WTP/dotProducts_WTP_wave2/"
file_list = list.files(file_dir, pattern = file_pattern)
for (file in file_list) {
  temp = tryCatch(read.table(file.path(file_dir,file), fill = TRUE) %>%
                    rename("subjectID" = V1,
                           "meanIntensity" = V3) %>%
                    extract(V2, "beta", "beta_([0-9]{4}).nii") %>%
                    mutate(beta = as.integer(beta),
                           wave = 2), error = function(e) message(file))
  intensities = rbind(intensities, temp)
  rm(temp)
}

load dot products

file_dir = "~/Documents/code/sanlab/DEV_scripts/fMRI/betaseries/WTP/dotProducts_WTP_wave1/"
file_pattern = "DEV[0-9]{3}_dotProducts.txt"
file_list = list.files(file_dir, pattern = file_pattern)

dots = data.frame()

for (file in file_list) {
  temp = tryCatch(read.table(file.path(file_dir,file), fill = TRUE) %>%
                    rename("subjectID" = V1,
                           "map" = V3,
                           "dotProduct" = V4) %>%
                    extract(V2, "beta", "beta_([0-9]{4}).nii") %>%
                    extract(map, "algorithm", "(.*)_.*.nii") %>%
                    mutate(beta = as.integer(beta),
                            wave = 1), error = function(e) message(file))
  dots = rbind(dots, temp)
  rm(temp)
}

file_dir = "~/Documents/code/sanlab/DEV_scripts/fMRI/betaseries/WTP/dotProducts_WTP_wave2/"
file_list = list.files(file_dir, pattern = file_pattern)

for (file in file_list) {
  temp = tryCatch(read.table(file.path(file_dir,file), fill = TRUE) %>%
                    rename("subjectID" = V1,
                           "map" = V3,
                           "dotProduct" = V4) %>%
                    extract(V2, "beta", "beta_([0-9]{4}).nii") %>%
                    extract(map, "algorithm", "(.*)_.*.nii") %>%
                    mutate(beta = as.integer(beta),
                            wave = 2), error = function(e) message(file))
  dots = rbind(dots, temp)
  rm(temp)
}

join intensities and dots

  • recode trials with extreme intensities as NA
dots.merged = dots %>%
  left_join(., intensities, by = c("subjectID", "wave", "beta")) %>%
  group_by(subjectID, wave, algorithm) %>%
  mutate(rownum = row_number())

# plot original
dots.merged %>%
  filter(algorithm == "craving_regulation") %>%
  ggplot(aes(1, meanIntensity)) +
    geom_boxplot()

# assess extreme values and exclude when calculating SDs
dots.merged %>%
  filter(algorithm == "craving_regulation") %>%
  arrange(meanIntensity)
dots.merged %>%
  filter(algorithm == "craving_regulation") %>%
  arrange(-meanIntensity)
# recode outliers as NA
dots.merged = dots.merged %>%
  ungroup() %>%
  mutate(meanIntensity = ifelse(meanIntensity > 1 | meanIntensity < -1, NA, meanIntensity),
         median = median(meanIntensity, na.rm = TRUE),
         sd3 = 3*sd(meanIntensity, na.rm = TRUE),
         outlier = ifelse(meanIntensity > median + sd3 | meanIntensity < median - sd3, "yes", "no"),
         dotProduct = ifelse(outlier == "yes", NA, dotProduct))
  
# plot after
dots.merged %>%
  filter(algorithm == "craving_regulation") %>%
  ggplot(aes(1, meanIntensity)) +
  geom_boxplot()

exclude outliers and standardize

  • standardize within algorithm and contrast
dots.ex = dots.merged %>%
  group_by(algorithm, wave, subjectID) %>%
  mutate(trial = row_number()) 

merge data

Exclusions

  • Didn’t scan: DEV002, DEV007
  • MRI motion and data quality exclusions: DEV001, DEV020, DEV032, DEV047, DEV063, DEV067, DEV078
  • Button box exclusions: DEV017, DEV019, DEV054
  • Run exclusions: DEV028 (run1), DEV048 (run3), DEV064 (run1), DEV069 (run1)

NB! NEED TO GO THROUGH NEW PARTICPANTS/WAVES

data_all = left_join(dots.ex, data.ex, by = c("subjectID", "wave", "trial")) %>%
  filter(!subjectID %in% c("DEV002", "DEV007", "DEV001", "DEV020", "DEV032", "DEV047", "DEV063", "DEV067", "DEV078", "DEV017", "DEV019", "DEV054")) %>%
  filter(!(subjectID == "DEV028" & run == "run1" & wave == 1) & !(subjectID == "DEV048" & run == "run3" & wave == 1) &
         !(subjectID == "DEV064" & run == "run1" & wave == 1) & !(subjectID == "DEV069" & run == "run1" & wave == 1)) %>%
  ungroup() %>%
  ungroup() %>%
  mutate(algorithm = gsub("_signature", "", algorithm),
         wave = as.character(wave),
         liking = ifelse(liking_rating > 2, "liked",
                  ifelse(liking_rating < 3, "disliked", NA))) %>%
  filter(!is.na(health))

data = data_all %>%
  filter(liking == "liked")

descriptives

number of participants

data %>%
  select(subjectID, wave) %>%
  unique() %>%
  group_by(wave) %>%
  summarize(n = n())

bids

across waves

data %>%
  group_by(health) %>%
  summarize(n = n(),
            mean = round(mean(bid, na.rm = TRUE), 2),
            sd = round(sd(bid, na.rm = TRUE), 2),
            min = min(bid, na.rm = TRUE),
            max = max(bid, na.rm = TRUE)) %>%
  kable(format = "pandoc")
health n mean sd min max
healthy 24744 1.03 0.42 0 1.5
unhealthy 19674 0.91 0.48 0 1.5

by wave

data %>%
  group_by(wave, health) %>%
  summarize(n = n(),
            mean = round(mean(bid, na.rm = TRUE), 2),
            sd = round(sd(bid, na.rm = TRUE), 2),
            min = min(bid, na.rm = TRUE),
            max = max(bid, na.rm = TRUE)) %>%
  kable(format = "pandoc")
wave health n mean sd min max
1 healthy 13074 1.02 0.42 0 1.5
1 unhealthy 10341 1.01 0.43 0 1.5
2 healthy 11670 1.04 0.43 0 1.5
2 unhealthy 9333 0.81 0.50 0 1.5

session 0 liking ratings

data_all %>%
  group_by(health) %>%
  summarize(n = n(),
            mean = round(mean(liking_rating, na.rm = TRUE), 2),
            sd = round(sd(liking_rating, na.rm = TRUE), 2),
            min = min(liking_rating, na.rm = TRUE),
            max = max(liking_rating, na.rm = TRUE)) %>%
  kable(format = "pandoc")
health n mean sd min max
healthy 46785 2.58 1.18 0 4
unhealthy 46794 2.22 1.23 0 4

correlations among signatures

craving & Koban craving

data %>%
  select(subjectID, wave, trial, algorithm, dotProduct) %>%
  spread(algorithm, dotProduct) %>%
  mutate(sub_wave = sprintf("%s_%s", subjectID, wave)) %>%
  rmcorr::rmcorr(as.factor(sub_wave), craving, nsc_koban, data = .)
## 
## Repeated measures correlation
## 
## r
## -0.08138986
## 
## degrees of freedom
## 14112
## 
## p-value
## 0.0000000000000000000003508496
## 
## 95% confidence interval
## -0.0977577 -0.06497801

craving & craving regulation

data %>%
  select(subjectID, wave, trial, algorithm, dotProduct) %>%
  spread(algorithm, dotProduct) %>%
  mutate(sub_wave = sprintf("%s_%s", subjectID, wave)) %>%
  rmcorr::rmcorr(as.factor(sub_wave), craving, craving_regulation, data = .)
## 
## Repeated measures correlation
## 
## r
## 0.1379588
## 
## degrees of freedom
## 14112
## 
## p-value
## 0.0000000000000000000000000000000000000000000000000000000000006315758
## 
## 95% confidence interval
## 0.1217368 0.1541071

Koban craving & craving regulation

data %>%
  select(subjectID, wave, trial, algorithm, dotProduct) %>%
  spread(algorithm, dotProduct) %>%
  mutate(sub_wave = sprintf("%s_%s", subjectID, wave)) %>%
  rmcorr::rmcorr(as.factor(sub_wave), nsc_koban, craving_regulation, data = .)
## 
## Repeated measures correlation
## 
## r
## -0.06609946
## 
## degrees of freedom
## 14112
## 
## p-value
## 0.000000000000003820737
## 
## 95% confidence interval
## -0.08250859 -0.0496545

visualize raw data

Only use liked foods (i.e., foods with a liking rating at session 0 of >2) for analyses other than when looking at relationships with liking specifically

bids only

across waves

data %>% 
  filter(algorithm == "craving") %>%
  ggplot(aes(health, bid, fill = health)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.5)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.5), width = 0) +
  scale_fill_manual(values = food) +
  labs(y = "bid value ($)\n", x = "\nfood type") +
  dc_bw +
  theme(legend.position = "none")

by wave

data %>% 
  filter(algorithm == "craving") %>%
  ggplot(aes(health, bid, fill = wave)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.95)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.95), width = 0) +
  scale_fill_manual(values = algorithm) +
  labs(y = "bid value ($)\n", x = "\nfood type") +
  dc_bw

bar plots

health

across waves

data %>% 
  ggplot(aes(health, dotProduct, fill = health)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.5)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.5), width = 0) +
  scale_fill_manual(values = food) +
  facet_grid(~algorithm) +
  labs(y = "signature expression\n", x = "\nfood type") +
  dc_bw +
  theme(legend.position = "none")

by wave

data %>% 
  ggplot(aes(health, dotProduct, fill = wave)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.95)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.95), width = 0) +
  scale_fill_manual(values = algorithm) +
  facet_grid(~algorithm) +
  labs(y = "signature expression\n", x = "\nfood type") +
  dc_bw

bids

across waves

data %>% 
  ggplot(aes(bid, dotProduct)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.5)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.5), width = 0) +
  facet_grid(~algorithm) +
  labs(y = "signature expression\n", x = "\nbid value ($)") +
  dc_bw

by wave

data %>% 
  ggplot(aes(bid, dotProduct, fill = wave)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.5)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.5), width = 0) +
  facet_grid(~algorithm) +
  scale_fill_manual(values = algorithm) +
  labs(y = "signature expression\n", x = "\nbid value ($)") +
  dc_bw

bid x health

across waves

data %>% 
  ggplot(aes(bid, dotProduct, fill = health)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.5)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.5), width = 0) +
  scale_fill_manual(values = food) +
  facet_grid(~algorithm) +
  labs(y = "signature expression\n", x = "\nbid value ($)") +
  dc_bw

by wave

data %>% 
  ggplot(aes(bid, dotProduct, fill = wave)) +
  stat_summary(fun = mean, geom = "bar", position = position_dodge(.5)) +
  stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position = position_dodge(.5), width = 0) +
  scale_fill_manual(values = algorithm) +
  facet_grid(health~algorithm) +
  labs(y = "signature expression\n", x = "\nbid value ($)") +
  dc_bw

scatterplots

bids

across waves

data %>% 
  ggplot(aes(dotProduct, bid, color = health, fill = health)) +
  geom_smooth(aes(group = interaction(subjectID, health)), method = "lm", se = FALSE, size = .1) +
  geom_smooth(method = "lm") +
  scale_color_manual(values = food) +
  scale_fill_manual(values = food) +
  facet_grid(~algorithm, scales = "free") +
  labs(x = "\nsignature expression", y = "bid value ($)\n") +
  dc_bw

by wave

data %>% 
  ggplot(aes(dotProduct, bid, color = wave, fill = wave)) +
  geom_smooth(aes(group = interaction(subjectID, wave)), method = "lm", se = FALSE, size = .1) +
  geom_smooth(method = "lm") +
  scale_color_manual(values = algorithm) +
  scale_fill_manual(values = algorithm) +
  facet_grid(health~algorithm, scales = "free") +
  labs(x = "\nsignature expression", y = "bid value ($)\n") +
  dc_bw

liking

data_all %>% 
  ggplot(aes(dotProduct, liking_rating, color = health, fill = health)) +
  geom_smooth(aes(group = interaction(subjectID, health)), method = "lm", se = FALSE, size = .1) +
  geom_smooth(method = "lm") +
  scale_color_manual(values = food) +
  scale_fill_manual(values = food) +
  facet_grid(~algorithm, scales = "free") +
  labs(x = "\nsignature expression", y = "liking rating\n") +
  dc_bw +
  theme(legend.position = "top")

MLM

Disaggregate within and between person relationships

  • dot_between = grand mean centered person average signature expression
  • dot_within = person-centered signature expression
between = data %>%
  group_by(wave, subjectID, algorithm) %>%
  summarize(dot_between = mean(dotProduct, na.rm = TRUE)) %>%
  ungroup() %>%
  mutate(dot_between = scale(dot_between, center = TRUE, scale = TRUE))

data_diss = data %>%
  group_by(wave, subjectID, algorithm) %>%
  mutate(dot_within = scale(dotProduct, center = TRUE, scale = TRUE)) %>%
  left_join(., between) %>%
  select(subjectID, wave, trial, health, bid, liking_rating, algorithm, dotProduct, dot_within, dot_between)

data_diss_craving = data_diss %>%
  filter(algorithm == "craving")

data_diss_craving_koban = data_diss %>%
  filter(algorithm == "nsc_koban")

data_diss_regulation = data_diss %>%
  filter(algorithm == "craving_regulation")

data_diss_liking = data_all %>%
  group_by(wave, subjectID, algorithm) %>%
  mutate(dot_within = scale(dotProduct, center = TRUE, scale = TRUE)) %>%
  left_join(., between) %>%
  select(subjectID, wave, trial, health, bid, liking_rating, algorithm, dotProduct, dot_within, dot_between)

data_diss_liking_craving = data_diss_liking %>%
  filter(algorithm == "craving")

data_diss_liking_craving_koban = data_diss_liking %>%
  filter(algorithm == "nsc_koban")

data_diss_liking_regulation = data_diss_liking %>%
  filter(algorithm == "craving_regulation")

no brain

bid ~ wave x health

the intervention decreased bids for unhealthy foods and slightly increased bids for healthy foods

tidytable

mod_bid_health = lmer(bid ~ health * wave + (1 | subjectID),
                  data = data_diss_craving,
                  control = lmerControl(optimizer = "bobyqa"))
table_model(mod_bid_health)
term b [95% CI] df t p
(Intercept) 1.01 [0.98, 1.03] 403.12 83.40 < .001
health (unhealthy) -0.00 [-0.02, 0.02] 13693.92 -0.27 .790
wave2 0.03 [0.01, 0.05] 13783.30 2.92 < .001
health (unhealthy) x wave2 -0.22 [-0.25, -0.19] 13615.08 -15.60 < .001

plot

ggeffects::ggpredict(mod_bid_health, terms = c("wave", "health")) %>%
  data.frame() %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  scale_color_manual(name = "", values = food) + 
  scale_fill_manual(name = "", values = food) + 
  labs(x = "\nwave", y = "predicted bid value\n") + 
  dc_bw

model summary

summary(mod_bid_health)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: bid ~ health * wave + (1 | subjectID)
##    Data: data_diss_craving
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 15471.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.2282 -0.6856  0.0327  0.8142  2.5547 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept) 0.02684  0.1638  
##  Residual              0.17135  0.4139  
## Number of obs: 13852, groups:  subjectID, 263
## 
## Fixed effects:
##                           Estimate   Std. Error           df t value
## (Intercept)               1.007886     0.012085   403.124914  83.402
## healthunhealthy          -0.002687     0.009959 13693.919404  -0.270
## wave2                     0.028070     0.009620 13783.295490   2.918
## healthunhealthy:wave2    -0.221797     0.014219 13615.082544 -15.599
##                                   Pr(>|t|)    
## (Intercept)           < 0.0000000000000002 ***
## healthunhealthy                    0.78735    
## wave2                              0.00353 ** 
## healthunhealthy:wave2 < 0.0000000000000002 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) hlthnh wave2 
## helthnhlthy -0.357              
## wave2       -0.370  0.445       
## hlthnhlth:2  0.247 -0.686 -0.652

craving

brain ~ health x wave

craving signature expression for unhealthy foods decreased from wave 1 to 2; no change for healthy foods

tidytable

mod_health = lmer(dotProduct ~ health * wave + (1 | subjectID),
                  data = data_diss_craving,
                  control = lmerControl(optimizer = "bobyqa"))
table_model(mod_health)
term b [95% CI] df t p
(Intercept) 2.16 [1.63, 2.68] 471.12 8.08 < .001
health (unhealthy) 1.90 [1.41, 2.39] 14479.99 7.62 < .001
wave2 0.04 [-0.44, 0.52] 14551.18 0.16 .870
health (unhealthy) x wave2 -0.68 [-1.39, 0.02] 14360.84 -1.89 .060

plot

ggeffects::ggpredict(mod_health, terms = c("wave", "health")) %>%
  data.frame() %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  scale_color_manual(name = "", values = food) + 
  scale_fill_manual(name = "", values = food) + 
  labs(x = "\nwave", y = "predicted pattern expression value\n") + 
  dc_bw

model summary

summary(mod_health)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: dotProduct ~ health * wave + (1 | subjectID)
##    Data: data_diss_craving
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 111327.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -9.4537 -0.6246 -0.0123  0.5962  7.8133 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept)  11.53    3.395  
##  Residual              115.95   10.768  
## Number of obs: 14602, groups:  subjectID, 264
## 
## Fixed effects:
##                          Estimate  Std. Error          df t value
## (Intercept)               2.15833     0.26700   471.11984   8.084
## healthunhealthy           1.90140     0.24957 14479.98695   7.619
## wave2                     0.03922     0.24324 14551.17930   0.161
## healthunhealthy:wave2    -0.68064     0.35990 14360.83508  -1.891
##                                  Pr(>|t|)    
## (Intercept)           0.00000000000000534 ***
## healthunhealthy       0.00000000000002718 ***
## wave2                              0.8719    
## healthunhealthy:wave2              0.0586 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) hlthnh wave2 
## helthnhlthy -0.410              
## wave2       -0.416  0.445       
## hlthnhlth:2  0.280 -0.679 -0.656

bid ~ brain x wave

between-person expression: higher average expression is associated with lower bids

within-person expression: higher trial-level expression is associated with higher bids

intervention-related decreases in bid value aren weaker (i.e., more positive) for people who have higher expression average

tidy table

mod_bid = lmer(bid ~ dot_between * wave + dot_within * wave + (1 | subjectID),
               data = data_diss_craving,
               control = lmerControl(optimizer = "bobyqa"))
table_model(mod_bid)
term b [95% CI] df t p
(Intercept) 1.01 [0.98, 1.03] 418.93 79.54 < .001
between 0.00 [-0.02, 0.02] 4021.29 0.32 .750
wave2 -0.08 [-0.10, -0.07] 13471.71 -8.88 < .001
within 0.02 [0.01, 0.03] 13391.82 3.99 < .001
between x wave2 0.03 [0.00, 0.05] 12185.06 2.38 .020
wave2 x within -0.00 [-0.02, 0.01] 13391.15 -0.42 .680

plot

by wave

vals = seq(-6, 6, .2)
ggeffects::ggpredict(mod_bid, terms = c("dot_between[vals]", "wave")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid, terms = c("dot_within[vals]", "wave")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line(aes(group = group)) +
  facet_grid(~type) +
  scale_color_manual(name = "wave", values = algorithm) + 
  scale_fill_manual(name = "wave", values = algorithm) + 
  labs(x = "\npattern expression value", y = "predicted bid value\n") + 
  dc_bw

by expression

ggeffects::ggpredict(mod_bid, terms = c("wave", "dot_between [-1, 0, 1]")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid, terms = c("wave", "dot_within [-1, 0, 1]")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  facet_grid(~type) +
  scale_color_manual(name = "expression", values = algorithm) + 
  scale_fill_manual(name = "expression", values = algorithm) + 
  labs(x = "\nwave", y = "predicted bid value\n") + 
  dc_bw

model summary

summary(mod_bid)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: bid ~ dot_between * wave + dot_within * wave + (1 | subjectID)
##    Data: data_diss_craving
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 15667.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -3.02066 -0.74653  0.05724  0.84822  2.36870 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept) 0.02701  0.1643  
##  Residual              0.17641  0.4200  
## Number of obs: 13658, groups:  subjectID, 263
## 
## Fixed effects:
##                       Estimate   Std. Error           df t value
## (Intercept)           1.005976     0.012647   418.931406  79.543
## dot_between           0.003148     0.009880  4021.286016   0.319
## wave2                -0.083465     0.009395 13471.706246  -8.884
## dot_within            0.020157     0.005051 13391.816230   3.991
## dot_between:wave2     0.025741     0.010795 12185.055760   2.385
## wave2:dot_within     -0.003037     0.007318 13391.153601  -0.415
##                               Pr(>|t|)    
## (Intercept)       < 0.0000000000000002 ***
## dot_between                     0.7501    
## wave2             < 0.0000000000000002 ***
## dot_within                   0.0000663 ***
## dot_between:wave2               0.0171 *  
## wave2:dot_within                0.6781    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) dt_btw wave2  dt_wth dt_b:2
## dot_between -0.439                            
## wave2       -0.383  0.398                     
## dot_within   0.005 -0.002 -0.010              
## dt_btwn:wv2  0.254 -0.599 -0.607  0.006       
## wv2:dt_wthn -0.004  0.001  0.010 -0.690 -0.006

bid ~ brain x health x wave

no 3-way interactions

tidy table

mod_bid_health = lmer(bid ~ dot_between*health*wave + dot_within*health*wave + (1 + health | subjectID),
                      data = data_diss_craving,
                      control = lmerControl(optimizer = "bobyqa"))
table_model(mod_bid_health)
term b [95% CI] df t p
(Intercept) 1.01 [0.98, 1.04] 435.96 67.88 < .001
between -0.01 [-0.03, 0.02] 3343.56 -0.59 .550
health (unhealthy) -0.02 [-0.07, 0.02] 446.12 -1.05 .290
wave2 0.01 [-0.01, 0.04] 13110.40 1.20 .230
within 0.02 [0.00, 0.03] 13175.29 2.52 .010
between x health (unhealthy) 0.02 [-0.01, 0.06] 3152.78 1.19 .230
between x wave2 0.02 [-0.00, 0.05] 11369.25 1.69 .090
health (unhealthy) x wave2 -0.22 [-0.25, -0.18] 13018.35 -12.27 < .001
health (unhealthy) x within 0.00 [-0.01, 0.02] 13180.54 0.43 .670
wave2 x within -0.00 [-0.02, 0.01] 13168.04 -0.40 .690
between x health (unhealthy) x wave2 0.00 [-0.04, 0.04] 11140.19 0.09 .930
health (unhealthy) x wave2 x within 0.02 [-0.01, 0.04] 13177.20 1.11 .270

plot

by wave

vals = seq(-6, 6, .2)
ggeffects::ggpredict(mod_bid_health, terms = c("dot_between[vals]", "wave", "health")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid_health, terms = c("dot_within[vals]", "wave", "health")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line(aes(group = group)) +
  facet_grid(type~facet) +
  scale_color_manual(name = "wave", values = algorithm) + 
  scale_fill_manual(name = "wave", values = algorithm) + 
  labs(x = "\npattern expression value", y = "predicted bid value\n") + 
  dc_bw

by expression

ggeffects::ggpredict(mod_bid_health, terms = c("wave", "dot_between [-1, 0, 1]", "health")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid_health, terms = c("wave", "dot_within [-1, 0, 1]", "health")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  facet_grid(type~facet) +
  scale_color_manual(name = "expression", values = algorithm) + 
  scale_fill_manual(name = "expression", values = algorithm) + 
  labs(x = "\nwave", y = "predicted bid value\n") + 
  dc_bw

model summary

summary(mod_bid_health)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: bid ~ dot_between * health * wave + dot_within * health * wave +  
##     (1 + health | subjectID)
##    Data: data_diss_craving
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 14370.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.3000 -0.6499  0.0261  0.7964  3.1144 
## 
## Random effects:
##  Groups    Name            Variance Std.Dev. Corr 
##  subjectID (Intercept)     0.03523  0.1877        
##            healthunhealthy 0.06978  0.2642   -0.52
##  Residual                  0.15432  0.3928        
## Number of obs: 13658, groups:  subjectID, 263
## 
## Fixed effects:
##                                       Estimate   Std. Error           df
## (Intercept)                           1.010852     0.014892   435.957912
## dot_between                          -0.007152     0.012032  3343.557978
## healthunhealthy                      -0.022811     0.021659   446.124797
## wave2                                 0.014102     0.011729 13110.403741
## dot_within                            0.016217     0.006423 13175.286446
## dot_between:healthunhealthy           0.021546     0.018110  3152.775598
## dot_between:wave2                     0.022457     0.013292 11369.253589
## healthunhealthy:wave2                -0.216925     0.017686 13018.351401
## healthunhealthy:dot_within            0.004105     0.009605 13180.536599
## wave2:dot_within                     -0.003660     0.009260 13168.036161
## dot_between:healthunhealthy:wave2     0.001789     0.020255 11140.186442
## healthunhealthy:wave2:dot_within      0.015415     0.013900 13177.202170
##                                   t value            Pr(>|t|)    
## (Intercept)                        67.879 <0.0000000000000002 ***
## dot_between                        -0.594              0.5523    
## healthunhealthy                    -1.053              0.2928    
## wave2                               1.202              0.2293    
## dot_within                          2.525              0.0116 *  
## dot_between:healthunhealthy         1.190              0.2343    
## dot_between:wave2                   1.689              0.0912 .  
## healthunhealthy:wave2             -12.265 <0.0000000000000002 ***
## healthunhealthy:dot_within          0.427              0.6692    
## wave2:dot_within                   -0.395              0.6926    
## dot_between:healthunhealthy:wave2   0.088              0.9296    
## healthunhealthy:wave2:dot_within    1.109              0.2674    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) dt_btw hlthnh wave2  dt_wth dt_bt: dt_b:2 hlth:2 hlth:_
## dot_between -0.456                                                        
## helthnhlthy -0.567  0.296                                                 
## wave2       -0.403  0.394  0.274                                          
## dot_within   0.046 -0.017 -0.032 -0.063                                   
## dt_btwn:hlt  0.287 -0.630 -0.468 -0.254  0.011                            
## dt_btwn:wv2  0.267 -0.603 -0.179 -0.603  0.021  0.391                     
## hlthnhlth:2  0.264 -0.254 -0.421 -0.658  0.041  0.401  0.394              
## hlthnhlth:_ -0.031  0.012 -0.004  0.042 -0.669  0.002 -0.014  0.004       
## wv2:dt_wthn -0.033  0.015  0.023  0.070 -0.693 -0.009 -0.023 -0.046  0.464
## dt_btwn:h:2 -0.172  0.387  0.276  0.390 -0.013 -0.605 -0.646 -0.605  0.001
## hlthnhl:2:_  0.022 -0.010  0.004 -0.047  0.462 -0.004  0.015 -0.006 -0.690
##             wv2:d_ dt_::2
## dot_between              
## helthnhlthy              
## wave2                    
## dot_within               
## dt_btwn:hlt              
## dt_btwn:wv2              
## hlthnhlth:2              
## hlthnhlth:_              
## wv2:dt_wthn              
## dt_btwn:h:2  0.015       
## hlthnhl:2:_ -0.666 -0.001

brain ~ liking x health

higher session 0 liking ratings are associated with stronger signature expression

this relationship is stronger for unhealthy foods

tidy table

mod_liking = lmer(dotProduct ~ liking_rating * health + (1 | subjectID),
                  data = data_diss_liking_craving,
                  control = lmerControl(optimizer = "bobyqa"))
table_model(mod_liking)
term b [95% CI] df t p
(Intercept) -1.24 [-1.84, -0.65] 913.41 -4.10 < .001
liking 0.96 [0.81, 1.11] 30704.55 12.55 < .001
health (unhealthy) 0.29 [-0.27, 0.84] 30652.14 1.01 .310
liking x health (unhealthy) 0.36 [0.15, 0.56] 30681.39 3.39 < .001

plot

ggeffects::ggpredict(mod_liking, terms = c("liking_rating", "health")) %>%
  data.frame() %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line() +
  scale_color_manual(name = "", values = food) + 
  scale_fill_manual(name = "", values = food) + 
  labs(x = "\nliking rating (session 0)", y = "signature expression\n") + 
  dc_bw

model summary

summary(mod_liking)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: dotProduct ~ liking_rating * health + (1 | subjectID)
##    Data: data_diss_liking_craving
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 234668.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -9.3602 -0.6174 -0.0126  0.5977 12.5332 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept)  11.79    3.433  
##  Residual              118.37   10.880  
## Number of obs: 30742, groups:  subjectID, 264
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value
## (Intercept)                      -1.2413     0.3029   913.4073  -4.098
## liking_rating                     0.9617     0.0766 30704.5523  12.555
## healthunhealthy                   0.2856     0.2840 30652.1392   1.006
## liking_rating:healthunhealthy     0.3577     0.1056 30681.3854   3.386
##                                           Pr(>|t|)    
## (Intercept)                              0.0000454 ***
## liking_rating                 < 0.0000000000000002 ***
## healthunhealthy                            0.31465    
## liking_rating:healthunhealthy              0.00071 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lkng_r hlthnh
## liking_rtng -0.653              
## helthnhlthy -0.541  0.690       
## lkng_rtng:h  0.468 -0.716 -0.897

Koban craving

brain ~ health x wave

craving signature expression for unhealthy foods decreased from wave 1 to 2; no change for healthy foods

tidytable

mod_health = lmer(dotProduct ~ health * wave + (1 | subjectID),
                  data = data_diss_craving_koban,
                  control = lmerControl(optimizer = "bobyqa"))
table_model(mod_health)
term b [95% CI] df t p
(Intercept) 2.56 [2.20, 2.91] 408.59 14.09 < .001
health (unhealthy) -0.46 [-0.75, -0.16] 14451.25 -3.03 < .001
wave2 -0.09 [-0.37, 0.20] 14519.94 -0.58 .560
health (unhealthy) x wave2 0.05 [-0.37, 0.48] 14354.84 0.25 .800

plot

ggeffects::ggpredict(mod_health, terms = c("wave", "health")) %>%
  data.frame() %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  scale_color_manual(name = "", values = food) + 
  scale_fill_manual(name = "", values = food) + 
  labs(x = "\nwave", y = "predicted pattern expression value\n") + 
  dc_bw

model summary

summary(mod_health)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: dotProduct ~ health * wave + (1 | subjectID)
##    Data: data_diss_craving_koban
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 96747.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.8357 -0.6117 -0.0035  0.5975  6.2191 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept)  6.025   2.455   
##  Residual              42.476   6.517   
## Number of obs: 14602, groups:  subjectID, 264
## 
## Fixed effects:
##                          Estimate  Std. Error          df t value
## (Intercept)               2.55766     0.18154   408.58538  14.088
## healthunhealthy          -0.45849     0.15118 14451.24784  -3.033
## wave2                    -0.08524     0.14743 14519.94297  -0.578
## healthunhealthy:wave2     0.05422     0.21786 14354.84216   0.249
##                                   Pr(>|t|)    
## (Intercept)           < 0.0000000000000002 ***
## healthunhealthy                    0.00243 ** 
## wave2                              0.56315    
## healthunhealthy:wave2              0.80346    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) hlthnh wave2 
## helthnhlthy -0.365              
## wave2       -0.370  0.445       
## hlthnhlth:2  0.249 -0.679 -0.655

bid ~ brain x wave

between-person expression: higher average expression is associated with lower bids

within-person expression: higher trial-level expression is associated with higher bids

intervention-related decreases in bid value aren’t moderated by signature expression

tidy table

mod_bid = lmer(bid ~ dot_between * wave + dot_within * wave + (1 | subjectID),
               data = data_diss_craving_koban,
               control = lmerControl(optimizer = "bobyqa"))
table_model(mod_bid)
term b [95% CI] df t p
(Intercept) 0.99 [0.97, 1.02] 446.88 75.63 < .001
between 0.03 [0.00, 0.06] 2829.76 2.24 .020
wave2 -0.08 [-0.10, -0.06] 13561.93 -7.49 < .001
within 0.06 [0.05, 0.07] 13392.60 12.89 < .001
between x wave2 0.01 [-0.02, 0.04] 13311.61 0.74 .460
wave2 x within 0.01 [-0.00, 0.03] 13389.64 1.67 .090

plot

by wave

vals = seq(-6, 6, .2)
ggeffects::ggpredict(mod_bid, terms = c("dot_between[vals]", "wave")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid, terms = c("dot_within[vals]", "wave")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line(aes(group = group)) +
  facet_grid(~type) +
  scale_color_manual(name = "wave", values = algorithm) + 
  scale_fill_manual(name = "wave", values = algorithm) + 
  labs(x = "\npattern expression value", y = "predicted bid value\n") + 
  dc_bw

by expression

ggeffects::ggpredict(mod_bid, terms = c("wave", "dot_between [-1, 0, 1]")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid, terms = c("wave", "dot_within [-1, 0, 1]")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  facet_grid(~type) +
  scale_color_manual(name = "expression", values = algorithm) + 
  scale_fill_manual(name = "expression", values = algorithm) + 
  labs(x = "\nwave", y = "predicted bid value\n") + 
  dc_bw

model summary

summary(mod_bid)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: bid ~ dot_between * wave + dot_within * wave + (1 | subjectID)
##    Data: data_diss_craving_koban
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 15318.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -3.14700 -0.71891  0.06117  0.80652  2.69710 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept) 0.02714  0.1647  
##  Residual              0.17189  0.4146  
## Number of obs: 13658, groups:  subjectID, 263
## 
## Fixed effects:
##                       Estimate   Std. Error           df t value
## (Intercept)           0.992776     0.013127   446.883628  75.629
## dot_between           0.032974     0.014694  2829.756726   2.244
## wave2                -0.075517     0.010086 13561.931744  -7.487
## dot_within            0.064190     0.004979 13392.603000  12.893
## dot_between:wave2     0.011130     0.015058 13311.608959   0.739
## wave2:dot_within      0.012072     0.007210 13389.640374   1.674
##                               Pr(>|t|)    
## (Intercept)       < 0.0000000000000002 ***
## dot_between                     0.0249 *  
## wave2               0.0000000000000746 ***
## dot_within        < 0.0000000000000002 ***
## dot_between:wave2               0.4598    
## wave2:dot_within                0.0941 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) dt_btw wave2  dt_wth dt_b:2
## dot_between -0.502                            
## wave2       -0.357  0.338                     
## dot_within  -0.001 -0.002  0.000              
## dt_btwn:wv2  0.239 -0.474 -0.683  0.003       
## wv2:dt_wthn  0.001  0.001 -0.001 -0.690 -0.004

bid ~ brain x health x wave

relationship between within-person expression and bid values for unhealthy foods is slightly stronger at wave 2

tidy table

mod_bid_health = lmer(bid ~ dot_between*health*wave + dot_within*health*wave + (1 + health | subjectID),
                      data = data_diss_craving_koban,
                      control = lmerControl(optimizer = "bobyqa"))
table_model(mod_bid_health)
term b [95% CI] df t p
(Intercept) 1.00 [0.97, 1.03] 471.22 64.30 < .001
between 0.02 [-0.02, 0.05] 2318.85 0.95 .340
health (unhealthy) -0.02 [-0.07, 0.02] 478.71 -1.12 .260
wave2 0.02 [-0.00, 0.05] 13143.52 1.60 .110
within 0.06 [0.05, 0.08] 13175.26 10.21 < .001
between x health (unhealthy) 0.05 [-0.00, 0.10] 2181.45 1.84 .070
between x wave2 0.01 [-0.02, 0.05] 12713.84 0.75 .450
health (unhealthy) x wave2 -0.21 [-0.25, -0.18] 13158.94 -11.31 < .001
health (unhealthy) x within -0.01 [-0.03, 0.01] 13183.43 -0.72 .470
wave2 x within -0.01 [-0.03, 0.01] 13178.10 -0.97 .330
between x health (unhealthy) x wave2 -0.01 [-0.06, 0.05] 12680.43 -0.29 .770
health (unhealthy) x wave2 x within 0.03 [0.00, 0.05] 13182.21 1.98 .050

plot

by wave

vals = seq(-6, 6, .2)
ggeffects::ggpredict(mod_bid_health, terms = c("dot_between[vals]", "wave", "health")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid_health, terms = c("dot_within[vals]", "wave", "health")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line(aes(group = group)) +
  facet_grid(type~facet) +
  scale_color_manual(name = "wave", values = algorithm) + 
  scale_fill_manual(name = "wave", values = algorithm) + 
  labs(x = "\npattern expression value", y = "predicted bid value\n") + 
  dc_bw

by expression

ggeffects::ggpredict(mod_bid_health, terms = c("wave", "dot_between [-1, 0, 1]", "health")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid_health, terms = c("wave", "dot_within [-1, 0, 1]", "health")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  facet_grid(type~facet) +
  scale_color_manual(name = "expression", values = algorithm) + 
  scale_fill_manual(name = "expression", values = algorithm) + 
  labs(x = "\nwave", y = "predicted bid value\n") + 
  dc_bw

model summary

summary(mod_bid_health)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: bid ~ dot_between * health * wave + dot_within * health * wave +  
##     (1 + health | subjectID)
##    Data: data_diss_craving_koban
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 14066.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.3873 -0.6517  0.0381  0.7724  3.4361 
## 
## Random effects:
##  Groups    Name            Variance Std.Dev. Corr 
##  subjectID (Intercept)     0.03476  0.1864        
##            healthunhealthy 0.06641  0.2577   -0.51
##  Residual                  0.15097  0.3886        
## Number of obs: 13658, groups:  subjectID, 263
## 
## Fixed effects:
##                                       Estimate   Std. Error           df
## (Intercept)                           0.996071     0.015491   471.219429
## dot_between                           0.017085     0.018033  2318.851659
## healthunhealthy                      -0.024862     0.022145   478.709671
## wave2                                 0.020386     0.012719 13143.516878
## dot_within                            0.063501     0.006221 13175.256256
## dot_between:healthunhealthy           0.048669     0.026490  2181.448019
## dot_between:wave2                     0.014189     0.018921 12713.838750
## healthunhealthy:wave2                -0.214112     0.018930 13158.938835
## healthunhealthy:dot_within           -0.006881     0.009496 13183.427781
## wave2:dot_within                     -0.008873     0.009111 13178.097518
## dot_between:healthunhealthy:wave2    -0.008144     0.028214 12680.425400
## healthunhealthy:wave2:dot_within      0.027222     0.013736 13182.213748
##                                   t value            Pr(>|t|)    
## (Intercept)                        64.298 <0.0000000000000002 ***
## dot_between                         0.947              0.3435    
## healthunhealthy                    -1.123              0.2621    
## wave2                               1.603              0.1090    
## dot_within                         10.208 <0.0000000000000002 ***
## dot_between:healthunhealthy         1.837              0.0663 .  
## dot_between:wave2                   0.750              0.4533    
## healthunhealthy:wave2             -11.311 <0.0000000000000002 ***
## healthunhealthy:dot_within         -0.725              0.4687    
## wave2:dot_within                   -0.974              0.3301    
## dot_between:healthunhealthy:wave2  -0.289              0.7729    
## healthunhealthy:wave2:dot_within    1.982              0.0475 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) dt_btw hlthnh wave2  dt_wth dt_bt: dt_b:2 hlth:2 hlth:_
## dot_between -0.529                                                        
## helthnhlthy -0.573  0.345                                                 
## wave2       -0.391  0.368  0.271                                          
## dot_within  -0.005 -0.015  0.003  0.010                                   
## dt_btwn:hlt  0.335 -0.633 -0.534 -0.245  0.010                            
## dt_btwn:wv2  0.265 -0.500 -0.182 -0.688  0.008  0.335                     
## hlthnhlth:2  0.261 -0.244 -0.393 -0.667 -0.007  0.339  0.457              
## hlthnhlth:_  0.003  0.010  0.000 -0.007 -0.655  0.004 -0.005 -0.003       
## wv2:dt_wthn  0.004  0.011 -0.003 -0.012 -0.682 -0.007 -0.022  0.008  0.447
## dt_btwn:h:2 -0.176  0.332  0.262  0.456 -0.006 -0.488 -0.664 -0.680  0.001
## hlthnhl:2:_ -0.002 -0.008  0.001  0.008  0.452 -0.003  0.014  0.002 -0.690
##             wv2:d_ dt_::2
## dot_between              
## helthnhlthy              
## wave2                    
## dot_within               
## dt_btwn:hlt              
## dt_btwn:wv2              
## hlthnhlth:2              
## hlthnhlth:_              
## wv2:dt_wthn              
## dt_btwn:h:2  0.014       
## hlthnhl:2:_ -0.664  0.000

brain ~ liking x health

higher session 0 liking ratings are associated with stronger signature expression

tidy table

mod_liking = lmer(dotProduct ~ liking_rating * health + (1 | subjectID),
                  data = data_diss_liking_craving_koban,
                  control = lmerControl(optimizer = "bobyqa"))
table_model(mod_liking)
term b [95% CI] df t p
(Intercept) -0.20 [-0.58, 0.19] 700.58 -0.99 .320
liking 0.75 [0.66, 0.84] 30663.63 16.39 < .001
health (unhealthy) -0.31 [-0.64, 0.03] 30613.14 -1.81 .070
liking x health (unhealthy) -0.03 [-0.15, 0.10] 30639.92 -0.41 .690

plot

ggeffects::ggpredict(mod_liking, terms = c("liking_rating", "health")) %>%
  data.frame() %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line() +
  scale_color_manual(name = "", values = food) + 
  scale_fill_manual(name = "", values = food) + 
  labs(x = "\nliking rating (session 0)", y = "signature expression\n") + 
  dc_bw

model summary

summary(mod_liking)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: dotProduct ~ liking_rating * health + (1 | subjectID)
##    Data: data_diss_liking_craving_koban
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 202918.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -9.1535 -0.6141  0.0002  0.6113  7.4154 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept)  5.876   2.424   
##  Residual              42.024   6.483   
## Number of obs: 30742, groups:  subjectID, 264
## 
## Fixed effects:
##                                  Estimate  Std. Error          df t value
## (Intercept)                      -0.19566     0.19748   700.58406  -0.991
## liking_rating                     0.74849     0.04568 30663.62655  16.387
## healthunhealthy                  -0.30627     0.16929 30613.13989  -1.809
## liking_rating:healthunhealthy    -0.02552     0.06297 30639.92428  -0.405
##                                          Pr(>|t|)    
## (Intercept)                                0.3222    
## liking_rating                 <0.0000000000000002 ***
## healthunhealthy                            0.0704 .  
## liking_rating:healthunhealthy              0.6852    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lkng_r hlthnh
## liking_rtng -0.597              
## helthnhlthy -0.494  0.690       
## lkng_rtng:h  0.428 -0.716 -0.897

craving regulation

brain ~ health x wave

signature expression was stronger for unhealthy foods

signature expression for unhealthy foods increase after the intervention

tidytable

mod_health = lmer(dotProduct ~ health * wave + (1 + health | subjectID),
                  data = data_diss_regulation,
                  control = lmerControl(optimizer = "bobyqa"))
table_model(mod_health)
term b [95% CI] df t p
(Intercept) -5.76 [-6.25, -5.27] 337.99 -23.04 < .001
health (unhealthy) 1.44 [1.05, 1.82] 827.24 7.26 < .001
wave2 -0.28 [-0.64, 0.09] 14354.61 -1.46 .140
health (unhealthy) x wave2 1.16 [0.61, 1.70] 14029.99 4.16 < .001

plot

ggeffects::ggpredict(mod_health, terms = c("wave", "health")) %>%
  data.frame() %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  scale_color_manual(name = "", values = food) + 
  scale_fill_manual(name = "", values = food) + 
  labs(x = "\nwave", y = "predicted pattern expression value\n") + 
  dc_bw

model summary

summary(mod_health)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: dotProduct ~ health * wave + (1 + health | subjectID)
##    Data: data_diss_regulation
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 103891.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.4832 -0.6325  0.0007  0.6334  6.0639 
## 
## Random effects:
##  Groups    Name            Variance Std.Dev. Corr 
##  subjectID (Intercept)     12.1518  3.4859        
##            healthunhealthy  0.4621  0.6798   -0.19
##  Residual                  68.9765  8.3052        
## Number of obs: 14602, groups:  subjectID, 264
## 
## Fixed effects:
##                         Estimate Std. Error         df t value
## (Intercept)              -5.7627     0.2501   337.9910 -23.042
## healthunhealthy           1.4352     0.1976   827.2382   7.262
## wave2                    -0.2754     0.1882 14354.6147  -1.463
## healthunhealthy:wave2     1.1576     0.2781 14029.9874   4.162
##                                   Pr(>|t|)    
## (Intercept)           < 0.0000000000000002 ***
## healthunhealthy          0.000000000000879 ***
## wave2                                0.143    
## healthunhealthy:wave2    0.000031712713529 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) hlthnh wave2 
## helthnhlthy -0.365              
## wave2       -0.342  0.433       
## hlthnhlth:2  0.230 -0.661 -0.656

bid ~ brain x wave

between-person expression: higher average expression is associated with lower bids

within-person expression: higher trial-level expression is associated with lower bids

intervention-related decreases in bid value are stronger (i.e., more negative) on trials with higher than average expression

tidy table

mod_bid = lmer(bid ~ dot_between * wave + dot_within * wave + (1 + dot_within | subjectID),
               data = data_diss_regulation,
               control = lmerControl(optimizer = "bobyqa"))
table_model(mod_bid)
term b [95% CI] df t p
(Intercept) 0.96 [0.93, 0.99] 710.97 61.17 < .001
between -0.05 [-0.07, -0.03] 2985.94 -4.62 < .001
wave2 -0.08 [-0.11, -0.06] 13281.52 -6.53 < .001
within -0.01 [-0.02, -0.00] 715.31 -2.08 .040
between x wave2 -0.02 [-0.04, 0.00] 13232.89 -1.57 .120
wave2 x within -0.03 [-0.04, -0.02] 12848.54 -4.10 < .001

plot

by wave

vals = seq(-6, 6, .2)
ggeffects::ggpredict(mod_bid, terms = c("dot_between[vals]", "wave")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid, terms = c("dot_within[vals]", "wave")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line(aes(group = group)) +
  facet_grid(~type) +
  scale_color_manual(name = "wave", values = algorithm) + 
  scale_fill_manual(name = "wave", values = algorithm) + 
  labs(x = "\npattern expression value", y = "predicted bid value\n") + 
  dc_bw

by expression

ggeffects::ggpredict(mod_bid, terms = c("wave", "dot_between [-1, 0, 1]")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid, terms = c("wave", "dot_within [-1, 0, 1]")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  facet_grid(~type) +
  scale_color_manual(name = "expression", values = algorithm) + 
  scale_fill_manual(name = "expression", values = algorithm) + 
  labs(x = "\nwave", y = "predicted bid value\n") + 
  dc_bw

model summary

summary(mod_bid)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: bid ~ dot_between * wave + dot_within * wave + (1 + dot_within |  
##     subjectID)
##    Data: data_diss_regulation
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 15574.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -3.12181 -0.71888  0.04117  0.83742  2.51205 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev. Corr 
##  subjectID (Intercept) 0.026395 0.16246       
##            dot_within  0.001269 0.03562  -0.03
##  Residual              0.174225 0.41740       
## Number of obs: 13658, groups:  subjectID, 263
## 
## Fixed effects:
##                       Estimate   Std. Error           df t value
## (Intercept)           0.957909     0.015659   710.974439  61.173
## dot_between          -0.049696     0.010747  2985.939936  -4.624
## wave2                -0.084906     0.013006 13281.524098  -6.528
## dot_within           -0.011547     0.005552   715.307711  -2.080
## dot_between:wave2    -0.016327     0.010367 13232.894142  -1.575
## wave2:dot_within     -0.030190     0.007357 12848.538891  -4.103
##                               Pr(>|t|)    
## (Intercept)       < 0.0000000000000002 ***
## dot_between            0.0000039187623 ***
## wave2                  0.0000000000689 ***
## dot_within                      0.0379 *  
## dot_between:wave2               0.1153    
## wave2:dot_within       0.0000409704321 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) dt_btw wave2  dt_wth dt_b:2
## dot_between  0.696                            
## wave2       -0.450 -0.461                     
## dot_within   0.000 -0.003 -0.008              
## dt_btwn:wv2 -0.377 -0.531  0.821  0.003       
## wv2:dt_wthn -0.005  0.003  0.007 -0.630 -0.004

bid ~ brain x health x wave

relationship between average (i.e., between-person) expression and bid values for unhealthy foods is slightly stronger (i.e., more negative) at wave 2

tidy table

mod_bid_health = lmer(bid ~ dot_between*health*wave + dot_within*health*wave + (1 + health | subjectID),
                      data = data_diss_regulation,
                      control = lmerControl(optimizer = "bobyqa"))
table_model(mod_bid_health)
term b [95% CI] df t p
(Intercept) 0.98 [0.94, 1.01] 741.28 52.01 < .001
between -0.03 [-0.05, -0.00] 2657.00 -2.09 .040
health (unhealthy) -0.05 [-0.11, 0.00] 731.50 -1.89 .060
wave2 0.03 [-0.00, 0.06] 13101.43 1.68 .090
within -0.01 [-0.03, -0.00] 13195.64 -2.27 .020
between x health (unhealthy) -0.05 [-0.09, -0.01] 2251.14 -2.42 .020
between x wave2 0.00 [-0.02, 0.03] 13005.95 0.17 .860
health (unhealthy) x wave2 -0.25 [-0.30, -0.20] 13012.70 -10.27 < .001
health (unhealthy) x within 0.01 [-0.01, 0.03] 13195.50 1.09 .270
wave2 x within -0.01 [-0.03, 0.01] 13188.09 -1.31 .190
between x health (unhealthy) x wave2 -0.04 [-0.08, -0.00] 12907.11 -2.03 .040
health (unhealthy) x wave2 x within 0.00 [-0.02, 0.03] 13189.60 0.18 .860

plot

by wave

vals = seq(-6, 6, .2)
ggeffects::ggpredict(mod_bid_health, terms = c("dot_between[vals]", "wave", "health")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid_health, terms = c("dot_within[vals]", "wave", "health")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line(aes(group = group)) +
  facet_grid(type~facet) +
  scale_color_manual(name = "wave", values = algorithm) + 
  scale_fill_manual(name = "wave", values = algorithm) + 
  labs(x = "\npattern expression value", y = "predicted bid value\n") + 
  dc_bw

by expression

ggeffects::ggpredict(mod_bid_health, terms = c("wave", "dot_between [-1, 0, 1]", "health")) %>%
  data.frame() %>%
  mutate(type = "between-person") %>%
  bind_rows(ggeffects::ggpredict(mod_bid_health, terms = c("wave", "dot_within [-1, 0, 1]", "health")) %>%
              data.frame() %>%
              mutate(type = "within-person")) %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high)) +
  geom_line(aes(group = group)) +
  facet_grid(type~facet) +
  scale_color_manual(name = "expression", values = algorithm) + 
  scale_fill_manual(name = "expression", values = algorithm) + 
  labs(x = "\nwave", y = "predicted bid value\n") + 
  dc_bw

model summary

summary(mod_bid_health)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: bid ~ dot_between * health * wave + dot_within * health * wave +  
##     (1 + health | subjectID)
##    Data: data_diss_regulation
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 14327.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.3293 -0.6472  0.0299  0.7941  3.2008 
## 
## Random effects:
##  Groups    Name            Variance Std.Dev. Corr 
##  subjectID (Intercept)     0.03496  0.1870        
##            healthunhealthy 0.06900  0.2627   -0.52
##  Residual                  0.15390  0.3923        
## Number of obs: 13658, groups:  subjectID, 263
## 
## Fixed effects:
##                                       Estimate   Std. Error           df
## (Intercept)                           0.976619     0.018779   741.284314
## dot_between                          -0.027408     0.013115  2656.999017
## healthunhealthy                      -0.052059     0.027555   731.495646
## wave2                                 0.027691     0.016485 13101.428526
## dot_within                           -0.014512     0.006396 13195.640117
## dot_between:healthunhealthy          -0.047530     0.019633  2251.136604
## dot_between:wave2                     0.002245     0.013158 13005.950314
## healthunhealthy:wave2                -0.252058     0.024548 13012.699222
## healthunhealthy:dot_within            0.010588     0.009687 13195.497277
## wave2:dot_within                     -0.012215     0.009357 13188.088563
## dot_between:healthunhealthy:wave2    -0.039532     0.019484 12907.107768
## healthunhealthy:wave2:dot_within      0.002515     0.014027 13189.603229
##                                   t value            Pr(>|t|)    
## (Intercept)                        52.006 <0.0000000000000002 ***
## dot_between                        -2.090              0.0367 *  
## healthunhealthy                    -1.889              0.0593 .  
## wave2                               1.680              0.0930 .  
## dot_within                         -2.269              0.0233 *  
## dot_between:healthunhealthy        -2.421              0.0156 *  
## dot_between:wave2                   0.171              0.8645    
## healthunhealthy:wave2             -10.268 <0.0000000000000002 ***
## healthunhealthy:dot_within          1.093              0.2744    
## wave2:dot_within                   -1.305              0.1918    
## dot_between:healthunhealthy:wave2  -2.029              0.0425 *  
## healthunhealthy:wave2:dot_within    0.179              0.8577    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) dt_btw hlthnh wave2  dt_wth dt_bt: dt_b:2 hlth:2 hlth:_
## dot_between  0.711                                                        
## helthnhlthy -0.593 -0.455                                                 
## wave2       -0.462 -0.463  0.311                                          
## dot_within   0.035  0.001 -0.024 -0.031                                   
## dt_btwn:hlt -0.446 -0.626  0.722  0.304 -0.001                            
## dt_btwn:wv2 -0.384 -0.533  0.259  0.822  0.009  0.351                     
## hlthnhlth:2  0.306  0.304 -0.480 -0.667  0.021 -0.470 -0.547              
## hlthnhlth:_ -0.024 -0.002 -0.001  0.021 -0.661 -0.005 -0.006 -0.002       
## wv2:dt_wthn -0.028 -0.005  0.018  0.071 -0.683  0.003  0.001 -0.048  0.451
## dt_btwn:h:2  0.255  0.354 -0.403 -0.550 -0.006 -0.546 -0.670  0.818  0.002
## hlthnhl:2:_  0.019  0.004  0.002 -0.047  0.456  0.006  0.000 -0.008 -0.689
##             wv2:d_ dt_::2
## dot_between              
## helthnhlthy              
## wave2                    
## dot_within               
## dt_btwn:hlt              
## dt_btwn:wv2              
## hlthnhlth:2              
## hlthnhlth:_              
## wv2:dt_wthn              
## dt_btwn:h:2  0.000       
## hlthnhl:2:_ -0.667 -0.005

brain ~ liking x health

higher session 0 liking ratings are associated with stronger signature expression for unhealthy foods

tidy table

mod_liking = lmer(dotProduct ~ liking_rating * health + (1 | subjectID),
                  data = data_diss_liking_regulation,
                  control = lmerControl(optimizer = "bobyqa"))
table_model(mod_liking)
term b [95% CI] df t p
(Intercept) -5.99 [-6.52, -5.46] 628.47 -22.21 < .001
liking 0.03 [-0.09, 0.15] 30643.39 0.51 .610
health (unhealthy) 0.82 [0.39, 1.25] 30596.84 3.75 < .001
liking x health (unhealthy) 0.33 [0.17, 0.49] 30621.16 4.05 < .001

plot

ggeffects::ggpredict(mod_liking, terms = c("liking_rating", "health")) %>%
  data.frame() %>%
  ggplot(aes(x, predicted, color = group, fill = group)) +
  geom_ribbon(aes(ymin = conf.low, ymax = conf.high), alpha = .5, color = NA) +
  geom_line() +
  scale_color_manual(name = "", values = food) + 
  scale_fill_manual(name = "", values = food) + 
  labs(x = "\nliking rating (session 0)", y = "signature expression\n") + 
  dc_bw

model summary

summary(mod_liking)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: dotProduct ~ liking_rating * health + (1 | subjectID)
##    Data: data_diss_liking_regulation
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 218918.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -5.5300 -0.6350  0.0014  0.6323  6.4918 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  subjectID (Intercept) 11.75    3.427   
##  Residual              70.62    8.404   
## Number of obs: 30742, groups:  subjectID, 264
## 
## Fixed effects:
##                                  Estimate  Std. Error          df t value
## (Intercept)                      -5.98759     0.26954   628.46993 -22.214
## liking_rating                     0.03019     0.05923 30643.38679   0.510
## healthunhealthy                   0.82354     0.21951 30596.83518   3.752
## liking_rating:healthunhealthy     0.33085     0.08166 30621.15925   4.052
##                                           Pr(>|t|)    
## (Intercept)                   < 0.0000000000000002 ***
## liking_rating                             0.610241    
## healthunhealthy                           0.000176 ***
## liking_rating:healthunhealthy             0.000051 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) lkng_r hlthnh
## liking_rtng -0.568              
## helthnhlthy -0.470  0.690       
## lkng_rtng:h  0.407 -0.716 -0.897